
package bankClient;

import java.lang.System;

import java.util.concurrent.CyclicBarrier;

public class Tester {
	
	public static void main(String args[]){
				
		CyclicBarrier barrier = new CyclicBarrier(20);		
		
	    for (int i = 1; i <= 10; i++)
	    {
	         new ClientRequest(barrier, 1,i).start();
	    }
	    
	    for (int i = 11; i <= 20; i++)
	    {
	         new ClientRequest(barrier,2, i).start();
	    }
	    	    
	    /*long startTime = System.currentTimeMillis();
	    long endTime = startTime + 15000;
	    	    
	    while( (System.currentTimeMillis()!= (startTime + 12000))) {
	    	//System.out.println("wait");	    	
	    };*/
	    	    
	    /*System.out.println("---- Results After Test: ----"+ ClientRequest.activeCount());	    
	    System.out.println("Final balance of account 01001 after tests is: " + ClientRequest.bankBranch1.getBalance("01001"));
	    System.out.println("Final balance of account 02001 after tests is: " + ClientRequest.bankBranch2.getBalance("02001"));
	    */
	    
	}
}
